import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

// 电影路由
import filmRouter from './routes/film'
// 电影详情
import detailRouter from './routes/detail'
// 影院
import cinemaRouter from './routes/cinema'
import centerRouter from './routes/center'
import citesRouter from './routes/cites'


// 网站的所有的路由规则定义
const routes = [
  filmRouter,
  detailRouter,
  cinemaRouter,
  centerRouter,
  citesRouter,
  {
    path: '/vuex',
    component: () => import('@/views/Vuex')
  },
  {
    path: '/',
    redirect: '/films'
  }
]

const router = new VueRouter({
  // mode: 'history',
  // base: process.env.BASE_URL,
  routes
})

export default router
